import request from '@/utils/request'

// 撤销咨询师资格
export function updateStatus(counselorId) {
    return request({
        url: `/counselor/counselor/updateStatus/${counselorId}`,
        method: 'put',
    })
}

// 获取已认证的咨询师列表
export function listCertifiedCounselors(query) {
    return request({
        url: '/counselor/counselor/listCounselors',
        method: 'get',
        params: query
    })
}

// 咨询师审核
export function handleApplyFor(data) {
    return request({
        url: '/counselor/counselor/handleApplyFor',
        method: 'post',
        data: data
    })
}

// 查询咨询师信息列表
export function listCounselor(query) {
    return request({
        url: '/counselor/counselor/list',
        method: 'get',
        params: query
    })
}

// 查询咨询师信息详细
export function getCounselor(counselorId) {
    return request({
        url: '/counselor/counselor/' + counselorId,
        method: 'get'
    })
}

// 新增咨询师信息
export function addCounselor(data) {
    return request({
        url: '/counselor/counselor',
        method: 'post',
        data: data
    })
}

// 修改咨询师信息
export function updateCounselor(data) {
    return request({
        url: '/counselor/counselor',
        method: 'put',
        data: data
    })
}

// 删除咨询师信息
export function delCounselor(counselorId) {
    return request({
        url: '/counselor/counselor/' + counselorId,
        method: 'delete'
    })
}
